package com.his.registration.controller;

import com.his.common.Result;
import com.his.registration.pojo.MedicalRecordDisease;
import com.his.registration.service.MedicalRecordDiseaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @BelongsProject: workspace-idea
 * @BelongsPackage: com.his.registration.controller
 * @Author: ZhangYing
 * @Date: 2023/7/3 15:20
 * @Description:
 */
@RestController
@CrossOrigin
@RequestMapping("/medicalrecorddisease")
public class MedicalRecordDiseaseController {
    @Autowired
    private MedicalRecordDiseaseService medicalRecordDiseaseService;

    //在疾病记录表中：给病历id增加疾病id
    @RequestMapping("/insert")
    public Result insert(MedicalRecordDisease medicalRecordDisease){
        int result = medicalRecordDiseaseService.insert(medicalRecordDisease);
        return Result.success("新增"+result+"条病历&疾病信息");
    }
}
